<template>
	<view>
		<uni-load-more v-if="lists.length === 0 && !articleShow" status="loading"></uni-load-more>
		<list-card v-for="item in lists" :key="item.id" :item="item"></list-card>
		<view class="no-data" v-if="articleShow">没有数据</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				lists:[],
				articleShow : false,
			};
		},
		onLoad() {
			this.getMyArticle()
		},
		methods: {
			getMyArticle() {
				this.$Api.get_my_article().then((res) => {
					const {data} = res;
					this.articleShow = this.lists.length === 0 ? true : false
					this.lists = data
				})
			}
		},
	}
</script>

<style lang="scss">
	.no-data{
		padding: 50px;
		font-size: 14px;
		color: #999;
		text-align: center;
	}
</style>
